package com.cc.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

/**
 * @author cc
 * @version 1.0
 * @date 2021/12/14 14:05
 */
@Data
public class User {
    @TableId(type = IdType.AUTO)
    /*AUTO(0),  主键自增（数据库对应字段要添加“自增”）
    NONE(1), 不适用主键策略
    INPUT(2), 手动输入
    ASSIGN_ID(3), 指定的id
    ASSIGN_UUID(4), 指定的uuid
    ID_WORKER(3),  默认的全局唯一id，雪花算法，是一个Long值
    ID_WORKER_STR(3), 全局唯一字符串id
    UUID(4); uuid全局唯一*/
    private Long id;
    private String name;
    private Integer age;
    private String email;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT)
    private String createUserId;
    @TableField(fill = FieldFill.INSERT)
    private String createUserName;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateUserId;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateUserName;
    @Version //乐观锁
    private Integer version;
    @TableLogic //逻辑删除
    private Integer deleted;
}
